home *** CD-ROM | disk | FTP | other *** search
/ 600 Games / 600games.iso / Diversos / cocoon.swf / scripts / frame_18 / PlaceObject2_288_147 / CLIPACTIONRECORD onClipEvent(enterFrame).as next >
Encoding:
Text File  |  2006-06-13  |  606 b   |  29 lines

  1. onClipEvent(enterFrame){
  2.    if(this.acceso == false)
  3.    {
  4.       _root.gamestopped = true;
  5.    }
  6.    else
  7.    {
  8.       _root.gamestopped = false;
  9.    }
  10.    if(this.acceso == true)
  11.    {
  12.       _root.timeleftformatted = Math.formatDecimals(_root.timeleft,1);
  13.       if(lasttime == undefined)
  14.       {
  15.          lasttime = getTimer();
  16.       }
  17.       if(getTimer() > lasttime + 100)
  18.       {
  19.          _root.timeleft -= 0.1;
  20.          lasttime = getTimer();
  21.       }
  22.    }
  23.    if(_root.timeleft <= 0)
  24.    {
  25.       _root.timeleftformatted = Math.formatDecimals(0,1);
  26.       _root.timeover = true;
  27.    }
  28. }
  29.